// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v3.21.12
// source: protos/tasks.proto

package proto

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

const (
	TasksService_GetTaskGroup_FullMethodName    = "/spqr.TasksService/GetTaskGroup"
	TasksService_WriteTaskGroup_FullMethodName  = "/spqr.TasksService/WriteTaskGroup"
	TasksService_RemoveTaskGroup_FullMethodName = "/spqr.TasksService/RemoveTaskGroup"
)

// TasksServiceClient is the client API for TasksService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type TasksServiceClient interface {
	GetTaskGroup(ctx context.Context, in *GetTaskGroupRequest, opts ...grpc.CallOption) (*GetTaskGroupReply, error)
	WriteTaskGroup(ctx context.Context, in *WriteTaskGroupRequest, opts ...grpc.CallOption) (*WriteTaskGroupReply, error)
	RemoveTaskGroup(ctx context.Context, in *RemoveTaskGroupRequest, opts ...grpc.CallOption) (*RemoveTaskGroupReply, error)
}

type tasksServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewTasksServiceClient(cc grpc.ClientConnInterface) TasksServiceClient {
	return &tasksServiceClient{cc}
}

func (c *tasksServiceClient) GetTaskGroup(ctx context.Context, in *GetTaskGroupRequest, opts ...grpc.CallOption) (*GetTaskGroupReply, error) {
	out := new(GetTaskGroupReply)
	err := c.cc.Invoke(ctx, TasksService_GetTaskGroup_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tasksServiceClient) WriteTaskGroup(ctx context.Context, in *WriteTaskGroupRequest, opts ...grpc.CallOption) (*WriteTaskGroupReply, error) {
	out := new(WriteTaskGroupReply)
	err := c.cc.Invoke(ctx, TasksService_WriteTaskGroup_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tasksServiceClient) RemoveTaskGroup(ctx context.Context, in *RemoveTaskGroupRequest, opts ...grpc.CallOption) (*RemoveTaskGroupReply, error) {
	out := new(RemoveTaskGroupReply)
	err := c.cc.Invoke(ctx, TasksService_RemoveTaskGroup_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// TasksServiceServer is the server API for TasksService service.
// All implementations must embed UnimplementedTasksServiceServer
// for forward compatibility
type TasksServiceServer interface {
	GetTaskGroup(context.Context, *GetTaskGroupRequest) (*GetTaskGroupReply, error)
	WriteTaskGroup(context.Context, *WriteTaskGroupRequest) (*WriteTaskGroupReply, error)
	RemoveTaskGroup(context.Context, *RemoveTaskGroupRequest) (*RemoveTaskGroupReply, error)
	mustEmbedUnimplementedTasksServiceServer()
}

// UnimplementedTasksServiceServer must be embedded to have forward compatible implementations.
type UnimplementedTasksServiceServer struct {
}

func (UnimplementedTasksServiceServer) GetTaskGroup(context.Context, *GetTaskGroupRequest) (*GetTaskGroupReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTaskGroup not implemented")
}
func (UnimplementedTasksServiceServer) WriteTaskGroup(context.Context, *WriteTaskGroupRequest) (*WriteTaskGroupReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method WriteTaskGroup not implemented")
}
func (UnimplementedTasksServiceServer) RemoveTaskGroup(context.Context, *RemoveTaskGroupRequest) (*RemoveTaskGroupReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RemoveTaskGroup not implemented")
}
func (UnimplementedTasksServiceServer) mustEmbedUnimplementedTasksServiceServer() {}

// UnsafeTasksServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TasksServiceServer will
// result in compilation errors.
type UnsafeTasksServiceServer interface {
	mustEmbedUnimplementedTasksServiceServer()
}

func RegisterTasksServiceServer(s grpc.ServiceRegistrar, srv TasksServiceServer) {
	s.RegisterService(&TasksService_ServiceDesc, srv)
}

func _TasksService_GetTaskGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetTaskGroupRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TasksServiceServer).GetTaskGroup(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TasksService_GetTaskGroup_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TasksServiceServer).GetTaskGroup(ctx, req.(*GetTaskGroupRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TasksService_WriteTaskGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(WriteTaskGroupRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TasksServiceServer).WriteTaskGroup(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TasksService_WriteTaskGroup_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TasksServiceServer).WriteTaskGroup(ctx, req.(*WriteTaskGroupRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TasksService_RemoveTaskGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RemoveTaskGroupRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TasksServiceServer).RemoveTaskGroup(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TasksService_RemoveTaskGroup_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TasksServiceServer).RemoveTaskGroup(ctx, req.(*RemoveTaskGroupRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// TasksService_ServiceDesc is the grpc.ServiceDesc for TasksService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TasksService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "spqr.TasksService",
	HandlerType: (*TasksServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetTaskGroup",
			Handler:    _TasksService_GetTaskGroup_Handler,
		},
		{
			MethodName: "WriteTaskGroup",
			Handler:    _TasksService_WriteTaskGroup_Handler,
		},
		{
			MethodName: "RemoveTaskGroup",
			Handler:    _TasksService_RemoveTaskGroup_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protos/tasks.proto",
}
